package com.ltedu.course.domain;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.ltedu.common.serializer.LongJsonDeserializer;
import com.ltedu.common.serializer.LongJsonSerializer;

import java.io.Serializable;

/**
 * <p>
 * 课程视频表
 * </p>
 *
 * @author Jerry
 * @since 2020-12-10
 */
@TableName("course_video")
public class Video implements Serializable {

    private static final long serialVersionUID=1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.ID_WORKER)
    @JsonDeserialize(using = LongJsonDeserializer.class)
    @JsonSerialize(using = LongJsonSerializer.class)
    private Long id;

    /**
     * 小节标题
     */
    private String title;

    /**
     * 课程id
     */
    @JsonDeserialize(using = LongJsonDeserializer.class)
    @JsonSerialize(using = LongJsonSerializer.class)
    private Long courseId;

    /**
     * 章节id
     */
    @JsonDeserialize(using = LongJsonDeserializer.class)
    @JsonSerialize(using = LongJsonSerializer.class)
    private Long chapterId;

    /**
     * 是否免费：1免费，0收费
     */
    private Integer isFree;

    /**
     * 是否存在视频(1存在，0否)
     */
    private Integer isDoc;

    /**
     * 文档名称
     */
    private String docName;

    /**
     * 文档地址
     */
    private String docUrl;

    /**
     * 购买人数
     */
    private Integer buyCount;

    /**
     * 已学习人数
     */
    private Integer studyCount;

    /**
     * 状态(1:正常，0:禁用)
     */
    private Integer state;

    /**
     * 是否存在视频(1存在，0否)
     */
    private Integer isVideo;

    /**
     * 云端视频资源
     */
    private String videoSourceId;

    /**
     * 原始文件名称
     */
    private String videoOriginalName;

    /**
     * 视频状态(1待上传，2上传成功，3上传失败)
     */
    private Integer videoState;

    /**
     * 视频源文件大小（字节）
     */
    private Long videoLength;

    /**
     * 视频时长（秒）
     */
    private Float duration;

    /**
     * 排序
     */
    private Integer sort;

    /**
     * 创建时间
     */
    private Date gmtCreate;

    /**
     * 更新时间
     */
    private Date gmtModified;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public Long getCourseId() {
        return courseId;
    }

    public void setCourseId(Long courseId) {
        this.courseId = courseId;
    }

    public Long getChapterId() {
        return chapterId;
    }

    public void setChapterId(Long chapterId) {
        this.chapterId = chapterId;
    }

    public Integer getFree() {
        return isFree;
    }

    public void setFree(Integer isFree) {
        this.isFree = isFree;
    }

    public Integer getDoc() {
        return isDoc;
    }

    public void setDoc(Integer isDoc) {
        this.isDoc = isDoc;
    }

    public String getDocName() {
        return docName;
    }

    public void setDocName(String docName) {
        this.docName = docName;
    }

    public String getDocUrl() {
        return docUrl;
    }

    public void setDocUrl(String docUrl) {
        this.docUrl = docUrl;
    }

    public Integer getBuyCount() {
        return buyCount;
    }

    public void setBuyCount(Integer buyCount) {
        this.buyCount = buyCount;
    }

    public Integer getStudyCount() {
        return studyCount;
    }

    public void setStudyCount(Integer studyCount) {
        this.studyCount = studyCount;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Integer getVideo() {
        return isVideo;
    }

    public void setVideo(Integer isVideo) {
        this.isVideo = isVideo;
    }

    public String getVideoSourceId() {
        return videoSourceId;
    }

    public void setVideoSourceId(String videoSourceId) {
        this.videoSourceId = videoSourceId;
    }

    public String getVideoOriginalName() {
        return videoOriginalName;
    }

    public void setVideoOriginalName(String videoOriginalName) {
        this.videoOriginalName = videoOriginalName;
    }

    public Integer getVideoState() {
        return videoState;
    }

    public void setVideoState(Integer videoState) {
        this.videoState = videoState;
    }

    public Long getVideoLength() {
        return videoLength;
    }

    public void setVideoLength(Long videoLength) {
        this.videoLength = videoLength;
    }

    public Float getDuration() {
        return duration;
    }

    public void setDuration(Float duration) {
        this.duration = duration;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public Date getGmtCreate() {
        return gmtCreate;
    }

    public void setGmtCreate(Date gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    public Date getGmtModified() {
        return gmtModified;
    }

    public void setGmtModified(Date gmtModified) {
        this.gmtModified = gmtModified;
    }

    @Override
    public String toString() {
        return "Video{" +
                "id=" + id +
                ", title='" + title + '\'' +
                ", courseId=" + courseId +
                ", chapterId=" + chapterId +
                ", isFree=" + isFree +
                ", isDoc=" + isDoc +
                ", docName='" + docName + '\'' +
                ", docUrl='" + docUrl + '\'' +
                ", buyCount=" + buyCount +
                ", studyCount=" + studyCount +
                ", state=" + state +
                ", isVideo=" + isVideo +
                ", videoSourceId='" + videoSourceId + '\'' +
                ", videoOriginalName='" + videoOriginalName + '\'' +
                ", videoState=" + videoState +
                ", videoLength=" + videoLength +
                ", duration=" + duration +
                ", sort=" + sort +
                ", gmtCreate=" + gmtCreate +
                ", gmtModified=" + gmtModified +
                '}';
    }
}
